package com.onedec.finance.servier.serviceimp;

import com.onedec.finance.entity.OnedecAccount;
import com.onedec.finance.mapper.OnedecAccountMapper;
import com.onedec.finance.servier.OnedecAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class OnedecAccountServiceImp implements OnedecAccountService {
    @Autowired
    private OnedecAccountMapper accountMapper;
    @Override
    public OnedecAccount selectById(int accountId) {
        OnedecAccount onedecAccount = accountMapper.selectByPrimaryKey(accountId);
        return onedecAccount;
    }
    @Override
    public List<OnedecAccount> selectnum() {
        List<OnedecAccount> selectnum = accountMapper.selectnum();
        return selectnum;
    }

    @Override
    public List<OnedecAccount> selectAllFinance() {
        List<OnedecAccount> onedecAccounts = accountMapper.selectByExample(null);
        return onedecAccounts;
    }

    @Override
    public List<Map<String, Object>> selectMonth() {
        List<Map<String, Object>> maps = accountMapper.selectMonth();
        return maps;
    }

    @Override
    public List<Map<String, Object>> selectMonths() {
        List<Map<String, Object>> maps = accountMapper.selectMonths();
        return maps;
    }
}
